import React, {useState } from 'react';
import { 
  Form,
  Select,
  Input,
  Button,
  Cascader,
  DatePicker,
  InputNumber,
} from 'antd';
import axios from 'axios'

const TianJia = () => {
    const FormSizeDemo = () => {
    const [componentSize, setComponentSize] = useState('default');
    const [kaHaoLeiXing,setKaHaoLeiXing] = useState(0)
    const onFormLayoutChange = ({ size }) => {setComponentSize(size); }; 
    const { Option } = Select;

function onChange(value) {
  console.log(`selected ${value}`);
}

function onBlur() {
  console.log('blur');
}

function onFocus() {
  console.log('focus');
}

function onSearch(val) {
  console.log('search:', val);
}

axios("/buMenMa/chaXunAll",{
  method:"get"
})
.then(res=>{
let a= res.data.list 
console.log(a);
let s=document.getElementsByClassName("qq");
console.log(Option);
})
.catch(err=>{
console.log(err);
})

    return (
      <>
        <Form
          labelCol={{span: 4, }}
          wrapperCol={{ span: 14,}}
          layout="horizontal"
          initialValues={{size: componentSize,}}
          onValuesChange={onFormLayoutChange}
          size={componentSize}
        >
          <Form.Item label="医疗卡号">
            <Input />
          </Form.Item>
          <Form.Item  label="医疗卡类型">
           <Input />
          </Form.Item>
          <Form.Item label="姓名">
            <Input />
          </Form.Item>
          <Form.Item label="性别">
            <Input />
          </Form.Item>
          <Form.Item label="身份证号">
            <Input />
          </Form.Item>       
          <Form.Item label="收费方式">
          <Input />
          </Form.Item>
          <Form.Item label="办理日期">
            <DatePicker />
          </Form.Item>
          <Form.Item label="余额">
            <InputNumber />
          </Form.Item>
          <Form.Item label="地址">
            <Input />
          </Form.Item>
          <Form.Item label="确认办理">
            <Button>确认</Button>
          </Form.Item>
        </Form>
      </>
    );
  };

    return (
      <div style={{width:600,marginLeft:200,}}> 
          <h2>添加</h2>        
          <FormSizeDemo />
        </div>
    );
}

export default TianJia;
